package com.gzh.teaching.model.vo;

import com.gzh.core.util.NumericHelper;
import com.gzh.teaching.service.dto.PickCourseIn;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotNull;

@Setter
@Getter
@ToString
public class PickCourseParam {

  private String courseId;

  private String key;

  public PickCourseIn paramToIn(Integer userId) {
    PickCourseIn in = new PickCourseIn();
    in.setCourseId(NumericHelper.toInteger(this.courseId));
    in.setKey(this.key);
    in.setUserId(userId);
    return in;
  }
}
